package com.example.eduservice.controller;

import com.example.commonutils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @author wlg
 * @create_time 2021-08-28 上午 9:33
 * @function
 */
@RestController
@RequestMapping("/eduservice/user")
//@CrossOrigin //解决跨域问题
public class EduLoginController {

    //login
    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }

    //info
    @GetMapping("info")
    public  R info(){
        return R.ok().data("roles","[admin]").data("avatar","https://ss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/9c16fdfaaf51f3de9ba8ee1194eef01f3a2979a8.jpg");
    }

}
